package by.bsu.touragency.db.dao;

import java.sql.ResultSet;
import java.sql.SQLException;
import org.apache.log4j.Logger;

public abstract class AbstractDAO {

	public static final String CHARSET = "UTF-8";
	protected ResultSet resultSet;
	protected ResultSet resultSet2;
	protected by.bsu.touragency.db.connection.DBConnector connector;
	private static Logger logger=Logger.getLogger("log");
	
	public void close() {
		if (resultSet != null) {
			try {
				resultSet.close();
			} catch (SQLException ex) {
				 logger.error(ex);
			}
		}
		if (resultSet2 != null) {
			try {
				resultSet2.close();
			} catch (SQLException ex) {
				 logger.error(ex);
			}
		}
		connector.close();
	}
}
